getValue

abstract fun getValue(): String

Gets the value associated with this configuration option.

The value is always returned as a String. It is the responsibility of the consuming code to interpret and, if necessary, parse this string into the appropriate data type based on the option's name and its documented behavior.

For example:

  • If getName() returns "scrollSpeed", getValue() might return "10" (to be parsed as an integer).
  • If getName() returns "autoPlay", getValue() might return "true" (to be parsed as a boolean).
  • If getName() returns "url", getValue() might return "http://example.com".
  • If getName() returns "customData", getValue() might be a JSON string.

The value can potentially be an empty string if an option is present but has no explicit value set, or if an empty value is meaningful for that option. It might be null if the option allows for it, though often an empty string is preferred over null for absent optional string values.

Return

The string representation of the option's value. This may be null, empty, or contain data that needs further parsing.